]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
build: Add configuration summaries
authorFlorian Müllner <fmuellner@gnome.org>
Thu, 5 Mar 2020 11:44:35 +0000 (12:44 +0100)
committerFlorian Müllner <fmuellner@gnome.org>
Sat, 21 Mar 2020 19:44:43 +0000 (20:44 +0100)
Meson now has a summary() function to easily summarize the build
configuration after the project was configured, use that for some
fancy output when the feature is available.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1072

meson.build
subprojects/extensions-tool/meson.build

index f9e178673a3cd2731078d926607c57dc4f5ba677..0532f7332e5a7b84d2bd49e404da366394645d8b 100644 (file)
@@ -271,3 +271,35 @@ if get_option('gtk_doc')
 endif
 
 meson.add_install_script('meson/postinstall.py')
+
+summary_options = {
+  'networkmanager': get_option('networkmanager'),
+  'systemd': get_option('systemd'),
+  'extensions_tool': get_option('extensions_tool'),
+  'man': get_option('man'),
+  'gtk_doc': get_option('gtk_doc'),
+}
+
+summary_build = {
+  'buildtype': get_option('buildtype'),
+  'debug': get_option('debug'),
+}
+
+summary_dirs = {
+  'prefix': get_option('prefix'),
+  'bindir': get_option('bindir'),
+  'libdir': get_option('libdir'),
+  'libexecdir': get_option('libexecdir'),
+  'datadir': get_option('datadir'),
+  'sysconfdir': get_option('sysconfdir'),
+}
+
+if get_option('man')
+  summary_dirs += { 'mandir': get_option('mandir') }
+endif
+
+if meson.version().version_compare('>= 0.53.0')
+  summary(summary_dirs, section: 'Directories')
+  summary(summary_build, section: 'Build Configuration')
+  summary(summary_options, section: 'Build Options')
+endif
index 4631eef5869e3e6cd523cc5b711aa1a9cfbc4993..d36c7fb002c60e44ef0be0689b6f78c60fc99c1d 100644 (file)
@@ -51,4 +51,30 @@ endif
 
 if not meson.is_subproject()
   subdir('po')
+
+  summary_dirs = {
+    'prefix': get_option('prefix'),
+    'bindir': get_option('bindir'),
+    'datadir': get_option('datadir'),
+  }
+
+  if get_option('man')
+    summary_dirs += { 'mandir': get_option('mandir') }
+  endif
+
+  summary_build = {
+    'buildtype': get_option('buildtype'),
+    'debug': get_option('debug'),
+  }
+
+  summary_options = {
+    'man': get_option('man'),
+    'bash_completion': bash_completion.found(),
+  }
+
+  if meson.version().version_compare('>= 0.53.0')
+    summary(summary_dirs, section: 'Directories')
+    summary(summary_build, section: 'Build Configuration')
+    summary(summary_options, section: 'Build Options')
+  endif
 endif